package com.itchen.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itchen.domain.entity.Role;
import com.itchen.mapper.RoleMapper;
import com.itchen.service.RoleService;
import org.springframework.stereotype.Service;

/**
 * 角色 Service 实现类
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {
    @Override
    public Role getByRoleName(String role) {
        return baseMapper.selectOne(new QueryWrapper<Role>().eq("name", role));
    }
}